Practical Strengthening of Preconditions

نویسندگان

  • Ashish Kundu
  • Patrick Eugster
چکیده

This paper takes a closer look at behavioral subtyping in the context of concurrency, by considering an example of subtyping of a concurrent datastructure taken from sensor networks. Akin to the extension of a state-machine, this example illustrates conflicts caused by the interference of concurrency and inheritance. In short, the extension consists in declaring additional fields in a subclass, thus extending the state space of the super-class. Reminiscent of a famous illustration case for inheritance anomalies, the extension leads to violating behavioral subtyping by requiring the strengthening of preconditions in the subclass to account for the extended state space. We provide a solution to this bottleneck by characterizing cases in which such a strengthening can safely occur. To that end, we dissect preconditions according to various criteria, such as their semantics (wait or “traditional” correctness), or the objects they involve (method arguments or fields of the receiving object). Using denotational semantics, we formally prove that such strengthening of preconditions through wait conditions is safe nd does not break the contract. We implement our relaxation in Eiffel, and illustrate how it preserves modular reasoning – in particular about deadlocks.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Precondition Inference for Peephole Optimizations in LLVM

Peephole optimizations are a common source of compiler bugs. Compiler developers typically transform an incorrect peephole optimization into a valid one by strengthening the precondition. This process is challenging and tedious. This paper proposes ALIVE-INFER, a data-driven approach that infers preconditions for peephole optimizations expressed in Alive. ALIVE-INFER generates positive and nega...

متن کامل

Creating Space for Fresh Approaches to Peacebuilding

The Life & Peace Institute (LPI) is an international and ecumenical centre that supports and promotes nonviolent approaches to conflict transformation. This is done through a combination of research and action that entails the strengthening of existing local capacities and enhancing preconditions for building peace.

متن کامل

Information and Communication Technologies to Support Chronic Disease Self-Management: Preconditions for Enhancing the Partnership in Person-Centered Care

Objective: In order to alleviate the pressure on health care systems exerted by the growing prevalence of chronic diseases, information and communication technologies (ICT) are being introduced to enable self-management of chronic diseases by supporting partnerships between patients and health care professionals. This move towards chronic disease self-management is accompanied by a shift in foc...

متن کامل

Practical formal techniques and tools for developing LLVM’s peephole optimizations

Peephole optimizations are local transformations which perform algebraic simplification to improve performance, reduce code size, or canonicalize code before it is presented to other stages of a compiler. They are a common source of compiler errors. This dissertation presents Alive, a domain-specific language for specifying peephole optimizations in LLVM, and the Alive-NJ toolkit, which automat...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2008